﻿using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Text;

namespace System.Timers
{
    /// <summary>
    /// 表示定时服务，具备自主启停功能
    /// </summary>
    /// <creator>marc</creator>
    public interface ITimerService<TServiceBody> : IHostedService
        where TServiceBody : ITimerServiceBody, new()
    {
        /// <summary>
        /// 循环周期，若小于等于0，则只执行一次
        /// </summary>
        double Interval { get; }
    }
}
